package cn.whit.blog.dao;

import java.sql.SQLException;
import java.util.List;

import cn.whit.blog.domain.StatisticalType;
import cn.whit.blog.domain.Tblog;
import cn.whit.blog.util.DynamicQuery;

public interface TblogDao {
	
	Tblog findById(String id) throws SQLException;
	
	List<Tblog> findAll() throws SQLException;

	int findTotalRecords() throws Exception;

	List<Tblog> findAllWithPage(int startIndex, int pageSize) throws Exception;

	List<Tblog> selectByQuery(DynamicQuery query);

	List<Tblog> findAllWithPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	int findTotalRecordsAndQuery(DynamicQuery query) throws Exception;

	long save(Tblog tblog) throws SQLException;

	void updateNum(String id, StatisticalType statisticalType) throws SQLException;

	void deleteById(String s) throws SQLException;

	List<Tblog> findByUserId(String s)  throws SQLException;
	
	
}
